package com.bw.module_home.property.model

import com.bw.lib_net.http.NetModule
import com.bw.module_home.property.api.PropertyApiService
import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
import dagger.hilt.components.SingletonComponent
import retrofit2.Retrofit
import javax.inject.Qualifier
import javax.inject.Singleton

@Module
@InstallIn(SingletonComponent::class)
object PropertyModule {

    @Provides
    @Singleton
    @CommonHomeApi
    fun providePropertyApiService(@NetModule.CommonRetrofit retrofit: Retrofit): PropertyApiService {
        return retrofit.create(PropertyApiService::class.java)
    }

    @Qualifier
    @Retention(AnnotationRetention.RUNTIME)
    annotation class CommonHomeApi
}